package com.young.common.exception;

/**
 * 基础异常
 */
public class BaseException extends RuntimeException{

    private int code = -1;//错误码
    private String info;//错误信息
    private String detail;//详情

    public BaseException() {
        super();
    }
    public BaseException(Throwable cause) {
        super(cause);
    }
    public BaseException(String info) {
        this.info = info;
    }
    public BaseException(int code, String info) {
        this.code = code;
        this.info = info;
    }
    public BaseException(int code, String info, String detail) {
        this.code = code;
        this.info = info;
        this.detail = detail;
    }

    public BaseException(String s, String info) {
        super(s);
        this.info = info;
    }

    public BaseException(String info, Throwable throwable) {
        super(info, throwable);
        this.info = info;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }
}
